package com.realworld.common;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;


@RestControllerAdvice
public class ExceptionConfig {
    @ExceptionHandler(value = ExceptionData.class)
    public R<ExceptionData> ExceptionHandle(ExceptionData e){
        return new R(e.getCode(), e.getMessage());
    }
}
